<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>推荐配件</title>
		<%@ include file="/WEB-INF/views/modules/marketHeader.jsp"%>
		<link rel="stylesheet" type="text/css" href="${ctxStatic}/IDH/css/goods/commodity_recommend.css" />
		<script type="text/javascript" src="${ctxStatic}/kkpager-master/src/kkpager.min.js"></script>
		<link rel="stylesheet" type="text/css" href="${ctxStatic}/kkpager-master/src/kkpager_blue.css" />
		
	</head>
	<body>
		<!--pc content start-->
		<section class="container content" id="container">
			<div class="col-xs-12">
				<div class="row">
					<c:forEach items="${page.list }" var="genProduct">
						<a href="${ctxf}/front/product/genProduct/detail?id=${genProduct.id}">
							<div class="item col-lg-3 col-md-4 col-xs-6">
								<div class="box">
									<span class="commodityName" title="${genProduct.name }">${genProduct.name }</span>
									<span class="commodityPrice">¥${genProduct.nowprice }</span>
									<p class="commodityDetail">${genProduct.introduce }</p>
									<div class="commodityImg text-center">
										<img src="${uploadPath }${genProduct.maxpicture }"/>
									</div>
								</div>
							</div>
						</a>
					</c:forEach>
				</div>
			</div>
			
		</section>
		<section class="container ${empty  page.list ? 'hide': ''}">
			<div class="col-xs-12">
				<div class="row">
					<div id="kkpager"></div>
				</div>
			</div>
		</section>
		<!--pc content end-->
		<%@ include file="/WEB-INF/views/modules/marketFooter.jsp"%>
	</body>
	<script type="text/javascript">
		$(document).ready(function() {
			
			//生成分页控件  
			kkpager.generPageHtml({
				pno : '${page.pageNo}',
				mode : 'click', //设置为click模式
				total : '${page.last}',  //总页码  
				//总数据条数  
				totalRecords : '${page.count}',
				//点击页码、页码输入框跳转、以及首页、下一页等按钮都会调用click
				//适用于不刷新页面，比如ajax
				click : function(n){
					queryPage(n);
			        //处理完后可以手动条用selectPage进行页码选中切换
			        this.selectPage(n);
			    },
			    //getHref是在click模式下链接算法，一般不需要配置，默认代码如下
			    getHref : function(n){
			        return '#';
			    }

			});
		});
		function queryPage(page) {
			$("#pageNo").val(page);
			$("#searchForm").submit();
		}		
		
		var height = $(window).height() - 276;
		$("#container").css("min-height",height);
	</script>
</html>